Decompose ReportActionsList: 9#94043
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-06-20.at.18.20.26.movAndroid: mWeb ChromeScreen.Recording.2026-06-20.at.18.17.22.moviOS: HybridAppScreen.Recording.2026-06-20.at.18.16.46.moviOS: mWeb SafariScreen.Recording.2026-06-20.at.18.14.25.movMacOS: Chrome / SafariScreen.Recording.2026-06-20.at.18.14.00.mov |
|
@DylanDylann can you double check the reviewers checklist please? I think we changed it recently. |
|
🚧 @rlinoz has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.4.17-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. I reviewed the changes in this PR and confirmed they do not require any updates to the help site files under Why: This is a pure internal performance optimization with no user-facing behavior change. The PR:
The end result is identical behavior (same messages, same visibility, same read/unread states) with fewer re-renders. There are no new features, UI labels, settings, or workflows that a customer would interact with, and the help site documents user-facing product behavior — none of which changes here. If I'm missing a user-facing aspect of this change, reply with |
Explanation of Change
The useReportActionsVisibility hook subscribed to the entire VISIBLE_REPORT_ACTIONS derived value — a collection containing visible actions for every report. That meant any change to any report's actions re-ran the hook for all reports, causing unnecessary re-renders.
Before this change: if you're viewing Report A and Report B receives an update (e.g. a new message), Report A's visibility logic re-runs and re-renders. Now Report A only reacts to its own updates. Profiler results from such scenario below:
Before (ReportActionsList rerenders)

After (LHN rerenders, ReportActionsList main component stays stable)

Fixed Issues
$ #89770
PROPOSAL:
Tests
Prerequisites: two accounts (A = you, B = sender) signed into separate sessions/devices; at least two shared reports (Report A and Report B)
Test 1: New message in the OPEN report
main(no jump or glitch).Test 2: New message in a DIFFERENT report (the optimization)
Prerequisite: account A is viewing Report A; Report B is visible in the LHN.
Test 3: Rapid report switching
Prerequisite: several reports open-able from LHN, including an expense report and Concierge.
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.native.mov
Android: mWeb Chrome
android.chrome.mov
iOS: Native
ios.native.mov
iOS: mWeb Safari
ios.safari.mov
MacOS: Chrome / Safari
web.mov